<template>
  <div class="flex ht100">
    <el-menu default-active="index" class="el-menu-vertical-demo" router >
      <el-menu-item :index="'/app/'+$route.params.appid+'/index'">
        <i class="el-icon-menu"></i>
        <span slot="title">概览</span>
      </el-menu-item>
      <el-submenu index="1">
        <template slot="title">
          <i class="el-icon-message"></i>
          <span slot="title">海报管理</span>
        </template>
        <el-menu-item-group>
          <el-menu-item :index="'/app/'+$route.params.appid+'/bannerIndex'">所有海报</el-menu-item>
          <el-menu-item :index="'/app/'+$route.params.appid+'/bannerEdit'">新建海报</el-menu-item>
        </el-menu-item-group>
      </el-submenu>
      <el-submenu index="2">
        <template slot="title">
          <i class="el-icon-message"></i>
          <span slot="title">文章管理</span>
        </template>
        <el-menu-item-group>
          <el-menu-item :index="'/app/'+$route.params.appid+'/menuIndex'">文章栏目</el-menu-item>
          <el-menu-item :index="'/app/'+$route.params.appid+'/articleIndex'">所有文章</el-menu-item>
          <el-menu-item :index="'/app/'+$route.params.appid+'/commentIndex'">评论</el-menu-item>
          <el-menu-item :index="'/app/'+$route.params.appid+'/articleEdit'">新建文章</el-menu-item>
        </el-menu-item-group>
      </el-submenu>
      <el-submenu index="3">
        <template slot="title">
          <i class="el-icon-message"></i>
          <span slot="title">标签管理</span>
        </template>
        <el-menu-item-group>
          <!--<el-menu-item :index="'/app/'+$route.params.appid+'/classIndex'">标签分类</el-menu-item>-->
          <el-menu-item :index="'/app/'+$route.params.appid+'/tagIndex'">所有标签</el-menu-item>
          <el-menu-item :index="'/app/'+$route.params.appid+'/tagEdit'">新建标签</el-menu-item>
        </el-menu-item-group>
      </el-submenu>
      <el-submenu index="4">
        <template slot="title">
          <i class="el-icon-message"></i>
          <span slot="title">品牌</span>
        </template>
        <el-menu-item-group>
          <el-menu-item :index="'/app/'+$route.params.appid+'/brandIndex'">所有品牌</el-menu-item>
          <el-menu-item :index="'/app/'+$route.params.appid+'/brandEdit'">新建品牌</el-menu-item>
        </el-menu-item-group>
      </el-submenu>
    </el-menu>
    <div class="flex1">
      <router-view></router-view>
    </div>
  </div>
</template>

<script>
export default {
  data () {
    return {
      data:[],
      pageParams:[]
    }
  },
  mounted(){
      this.Api.getWehcat({pageParams:this.pageParams}).then((response)=>{
          this.data=response.data.data;
          this.pageParams=response.data.pageParams;
      })
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>

</style>
